package com.ruoyi.personal.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.personal.mapper.RelativesAbroadMapper;
import com.ruoyi.personal.domain.RelativesAbroad;
import com.ruoyi.personal.service.IRelativesAbroadService;

/**
 * 亲属出国，用于记录亲属出国相关信息Service业务层处理
 * 
 * @author qjp
 * @date 2024-09-18
 */
@Service
public class RelativesAbroadServiceImpl implements IRelativesAbroadService 
{
    @Autowired
    private RelativesAbroadMapper relativesAbroadMapper;

    /**
     * 查询亲属出国，用于记录亲属出国相关信息
     * 
     * @param id 亲属出国，用于记录亲属出国相关信息主键
     * @return 亲属出国，用于记录亲属出国相关信息
     */
    @Override
    public RelativesAbroad selectRelativesAbroadById(Long id)
    {
        return relativesAbroadMapper.selectRelativesAbroadById(id);
    }

    /**
     * 查询亲属出国，用于记录亲属出国相关信息列表
     * 
     * @param relativesAbroad 亲属出国，用于记录亲属出国相关信息
     * @return 亲属出国，用于记录亲属出国相关信息
     */
    @Override
    public List<RelativesAbroad> selectRelativesAbroadList(RelativesAbroad relativesAbroad)
    {
        return relativesAbroadMapper.selectRelativesAbroadList(relativesAbroad);
    }

    /**
     * 新增亲属出国，用于记录亲属出国相关信息
     * 
     * @param relativesAbroad 亲属出国，用于记录亲属出国相关信息
     * @return 结果
     */
    @Override
    public int insertRelativesAbroad(RelativesAbroad relativesAbroad)
    {
        return relativesAbroadMapper.insertRelativesAbroad(relativesAbroad);
    }

    /**
     * 修改亲属出国，用于记录亲属出国相关信息
     * 
     * @param relativesAbroad 亲属出国，用于记录亲属出国相关信息
     * @return 结果
     */
    @Override
    public int updateRelativesAbroad(RelativesAbroad relativesAbroad)
    {
        return relativesAbroadMapper.updateRelativesAbroad(relativesAbroad);
    }

    /**
     * 批量删除亲属出国，用于记录亲属出国相关信息
     * 
     * @param ids 需要删除的亲属出国，用于记录亲属出国相关信息主键
     * @return 结果
     */
    @Override
    public int deleteRelativesAbroadByIds(Long[] ids)
    {
        return relativesAbroadMapper.deleteRelativesAbroadByIds(ids);
    }

    /**
     * 删除亲属出国，用于记录亲属出国相关信息信息
     * 
     * @param id 亲属出国，用于记录亲属出国相关信息主键
     * @return 结果
     */
    @Override
    public int deleteRelativesAbroadById(Long id)
    {
        return relativesAbroadMapper.deleteRelativesAbroadById(id);
    }
}
